Integrand size = 42, antiderivative size = 345 \[ \int \frac {B \cos (c+d x)+C \cos ^2(c+d x)}{\cos ^{\frac {7}{2}}(c+d x) (a+b \cos (c+d x))^2} \, dx=\frac {\left (4 a^2 b B-5 b^3 B-2 a^3 C+3 a b^2 C\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{a^3 \left (a^2-b^2\right ) d}+\frac {\left (2 a^2 B-5 b^2 B+3 a b C\right ) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{3 a^2 \left (a^2-b^2\right ) d}+\frac {b \left (7 a^2 b B-5 b^3 B-5 a^3 C+3 a b^2 C\right ) \operatorname {EllipticPi}\left (\frac {2 b}{a+b},\frac {1}{2} (c+d x),2\right )}{a^3 (a-b) (a+b)^2 d}+\frac {\left (2 a^2 B-5 b^2 B+3 a b C\right ) \sin (c+d x)}{3 a^2 \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x)}-\frac {\left (4 a^2 b B-5 b^3 B-2 a^3 C+3 a b^2 C\right ) \sin (c+d x)}{a^3 \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)}}+\frac {b (b B-a C) \sin (c+d x)}{a \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))} \]
[Out]
Time = 1.51 (sec) , antiderivative size = 345, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3108, 3079, 3134, 3138, 2719, 3081, 2720, 2884} \[ \int \frac {B \cos (c+d x)+C \cos ^2(c+d x)}{\cos ^{\frac {7}{2}}(c+d x) (a+b \cos (c+d x))^2} \, dx=\frac {\left (2 a^2 B+3 a b C-5 b^2 B\right ) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{3 a^2 d \left (a^2-b^2\right )}+\frac {b (b B-a C) \sin (c+d x)}{a d \left (a^2-b^2\right ) \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))}+\frac {\left (2 a^2 B+3 a b C-5 b^2 B\right ) \sin (c+d x)}{3 a^2 d \left (a^2-b^2\right ) \cos ^{\frac {3}{2}}(c+d x)}+\frac {\left (-2 a^3 C+4 a^2 b B+3 a b^2 C-5 b^3 B\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{a^3 d \left (a^2-b^2\right )}+\frac {b \left (-5 a^3 C+7 a^2 b B+3 a b^2 C-5 b^3 B\right ) \operatorname {EllipticPi}\left (\frac {2 b}{a+b},\frac {1}{2} (c+d x),2\right )}{a^3 d (a-b) (a+b)^2}-\frac {\left (-2 a^3 C+4 a^2 b B+3 a b^2 C-5 b^3 B\right ) \sin (c+d x)}{a^3 d \left (a^2-b^2\right ) \sqrt {\cos (c+d x)}} \]
[In]
[Out]
Rule 2719
Rule 2720
Rule 2884
Rule 3079
Rule 3081
Rule 3108
Rule 3134
Rule 3138
Rubi steps \begin{align*} \text {integral}& = \int \frac {B+C \cos (c+d x)}{\cos ^{\frac {5}{2}}(c+d x) (a+b \cos (c+d x))^2} \, dx \\ & = \frac {b (b B-a C) \sin (c+d x)}{a \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))}+\frac {\int \frac {\frac {1}{2} \left (2 a^2 B-5 b^2 B+3 a b C\right )-a (b B-a C) \cos (c+d x)+\frac {3}{2} b (b B-a C) \cos ^2(c+d x)}{\cos ^{\frac {5}{2}}(c+d x) (a+b \cos (c+d x))} \, dx}{a \left (a^2-b^2\right )} \\ & = \frac {\left (2 a^2 B-5 b^2 B+3 a b C\right ) \sin (c+d x)}{3 a^2 \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x)}+\frac {b (b B-a C) \sin (c+d x)}{a \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))}+\frac {2 \int \frac {-\frac {3}{4} \left (4 a^2 b B-5 b^3 B-2 a^3 C+3 a b^2 C\right )+\frac {1}{2} a \left (a^2 B+2 b^2 B-3 a b C\right ) \cos (c+d x)+\frac {1}{4} b \left (2 a^2 B-5 b^2 B+3 a b C\right ) \cos ^2(c+d x)}{\cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))} \, dx}{3 a^2 \left (a^2-b^2\right )} \\ & = \frac {\left (2 a^2 B-5 b^2 B+3 a b C\right ) \sin (c+d x)}{3 a^2 \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x)}-\frac {\left (4 a^2 b B-5 b^3 B-2 a^3 C+3 a b^2 C\right ) \sin (c+d x)}{a^3 \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)}}+\frac {b (b B-a C) \sin (c+d x)}{a \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))}+\frac {4 \int \frac {\frac {1}{8} \left (2 a^4 B+16 a^2 b^2 B-15 b^4 B-12 a^3 b C+9 a b^3 C\right )+\frac {1}{4} a \left (7 a^2 b B-10 b^3 B-3 a^3 C+6 a b^2 C\right ) \cos (c+d x)+\frac {3}{8} b \left (4 a^2 b B-5 b^3 B-2 a^3 C+3 a b^2 C\right ) \cos ^2(c+d x)}{\sqrt {\cos (c+d x)} (a+b \cos (c+d x))} \, dx}{3 a^3 \left (a^2-b^2\right )} \\ & = \frac {\left (2 a^2 B-5 b^2 B+3 a b C\right ) \sin (c+d x)}{3 a^2 \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x)}-\frac {\left (4 a^2 b B-5 b^3 B-2 a^3 C+3 a b^2 C\right ) \sin (c+d x)}{a^3 \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)}}+\frac {b (b B-a C) \sin (c+d x)}{a \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))}-\frac {4 \int \frac {-\frac {1}{8} b \left (2 a^4 B+16 a^2 b^2 B-15 b^4 B-12 a^3 b C+9 a b^3 C\right )-\frac {1}{8} a b^2 \left (2 a^2 B-5 b^2 B+3 a b C\right ) \cos (c+d x)}{\sqrt {\cos (c+d x)} (a+b \cos (c+d x))} \, dx}{3 a^3 b \left (a^2-b^2\right )}+\frac {\left (4 a^2 b B-5 b^3 B-2 a^3 C+3 a b^2 C\right ) \int \sqrt {\cos (c+d x)} \, dx}{2 a^3 \left (a^2-b^2\right )} \\ & = \frac {\left (4 a^2 b B-5 b^3 B-2 a^3 C+3 a b^2 C\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{a^3 \left (a^2-b^2\right ) d}+\frac {\left (2 a^2 B-5 b^2 B+3 a b C\right ) \sin (c+d x)}{3 a^2 \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x)}-\frac {\left (4 a^2 b B-5 b^3 B-2 a^3 C+3 a b^2 C\right ) \sin (c+d x)}{a^3 \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)}}+\frac {b (b B-a C) \sin (c+d x)}{a \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))}+\frac {\left (2 a^2 B-5 b^2 B+3 a b C\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx}{6 a^2 \left (a^2-b^2\right )}+\frac {\left (b \left (7 a^2 b B-5 b^3 B-5 a^3 C+3 a b^2 C\right )\right ) \int \frac {1}{\sqrt {\cos (c+d x)} (a+b \cos (c+d x))} \, dx}{2 a^3 \left (a^2-b^2\right )} \\ & = \frac {\left (4 a^2 b B-5 b^3 B-2 a^3 C+3 a b^2 C\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{a^3 \left (a^2-b^2\right ) d}+\frac {\left (2 a^2 B-5 b^2 B+3 a b C\right ) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{3 a^2 \left (a^2-b^2\right ) d}+\frac {b \left (7 a^2 b B-5 b^3 B-5 a^3 C+3 a b^2 C\right ) \operatorname {EllipticPi}\left (\frac {2 b}{a+b},\frac {1}{2} (c+d x),2\right )}{a^3 (a-b) (a+b)^2 d}+\frac {\left (2 a^2 B-5 b^2 B+3 a b C\right ) \sin (c+d x)}{3 a^2 \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x)}-\frac {\left (4 a^2 b B-5 b^3 B-2 a^3 C+3 a b^2 C\right ) \sin (c+d x)}{a^3 \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)}}+\frac {b (b B-a C) \sin (c+d x)}{a \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))} \\ \end{align*}
Time = 7.23 (sec) , antiderivative size = 363, normalized size of antiderivative = 1.05 \[ \int \frac {B \cos (c+d x)+C \cos ^2(c+d x)}{\cos ^{\frac {7}{2}}(c+d x) (a+b \cos (c+d x))^2} \, dx=\frac {\frac {\frac {2 \left (4 a^4 B+44 a^2 b^2 B-45 b^4 B-30 a^3 b C+27 a b^3 C\right ) \operatorname {EllipticPi}\left (\frac {2 b}{a+b},\frac {1}{2} (c+d x),2\right )}{a+b}-\frac {8 a \left (-7 a^2 b B+10 b^3 B+3 a^3 C-6 a b^2 C\right ) \left ((a+b) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )-a \operatorname {EllipticPi}\left (\frac {2 b}{a+b},\frac {1}{2} (c+d x),2\right )\right )}{b (a+b)}-\frac {6 \left (-4 a^2 b B+5 b^3 B+2 a^3 C-3 a b^2 C\right ) \left (-2 a b E\left (\left .\arcsin \left (\sqrt {\cos (c+d x)}\right )\right |-1\right )+2 a (a+b) \operatorname {EllipticF}\left (\arcsin \left (\sqrt {\cos (c+d x)}\right ),-1\right )+\left (-2 a^2+b^2\right ) \operatorname {EllipticPi}\left (-\frac {b}{a},\arcsin \left (\sqrt {\cos (c+d x)}\right ),-1\right )\right ) \sin (c+d x)}{a b \sqrt {\sin ^2(c+d x)}}}{(a-b) (a+b)}+4 \sqrt {\cos (c+d x)} \left (\frac {3 b^3 (b B-a C) \sin (c+d x)}{\left (a^2-b^2\right ) (a+b \cos (c+d x))}+2 (-6 b B+3 a C+a B \sec (c+d x)) \tan (c+d x)\right )}{12 a^3 d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(1003\) vs. \(2(413)=826\).
Time = 15.56 (sec) , antiderivative size = 1004, normalized size of antiderivative = 2.91
[In]
[Out]
Timed out. \[ \int \frac {B \cos (c+d x)+C \cos ^2(c+d x)}{\cos ^{\frac {7}{2}}(c+d x) (a+b \cos (c+d x))^2} \, dx=\text {Timed out} \]
[In]
[Out]
Timed out. \[ \int \frac {B \cos (c+d x)+C \cos ^2(c+d x)}{\cos ^{\frac {7}{2}}(c+d x) (a+b \cos (c+d x))^2} \, dx=\text {Timed out} \]
[In]
[Out]
Timed out. \[ \int \frac {B \cos (c+d x)+C \cos ^2(c+d x)}{\cos ^{\frac {7}{2}}(c+d x) (a+b \cos (c+d x))^2} \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \frac {B \cos (c+d x)+C \cos ^2(c+d x)}{\cos ^{\frac {7}{2}}(c+d x) (a+b \cos (c+d x))^2} \, dx=\int { \frac {C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )}{{\left (b \cos \left (d x + c\right ) + a\right )}^{2} \cos \left (d x + c\right )^{\frac {7}{2}}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {B \cos (c+d x)+C \cos ^2(c+d x)}{\cos ^{\frac {7}{2}}(c+d x) (a+b \cos (c+d x))^2} \, dx=\int \frac {C\,{\cos \left (c+d\,x\right )}^2+B\,\cos \left (c+d\,x\right )}{{\cos \left (c+d\,x\right )}^{7/2}\,{\left (a+b\,\cos \left (c+d\,x\right )\right )}^2} \,d x \]
[In]
[Out]